package com.project.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.project.bean.kaoshiUserBean;
import com.project.mapper.kaoshiIUserMapper;
import com.project.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @Author(王思翰)
 * @Description(类的描述)
 * @Date(创建时间) 2021/8/5 9:35
 */
@Service
@Transactional
public class UserServiceImpl implements IUserService {
    @Autowired
    private kaoshiIUserMapper mapper;

    @Override
    public void add(kaoshiUserBean kaoshiUserBean) {
        mapper.add(kaoshiUserBean);
    }

    @Override
    public PageInfo<kaoshiUserBean> findByItem(int pageNo) {
        PageHelper.startPage(pageNo,3);
        PageInfo<kaoshiUserBean> pageInfo=PageInfo.of(mapper.findByItem());
        return pageInfo;
    }
}
